snippet function  "definition of function" b
function! `!p
import os
import re
names, filename = os.path.splitext(os.path.abspath(path))
filepath = re.split("autoload", names)
if len(filepath) > 1:
	subpath = filepath[1]
	text = os.path.split(subpath[1:])
	snip.rv = '#'.join(text) + '#'
else:
	snip.rv = 's:'
`${1:init}() abort
    ${2}
endfunction
endsnippet

snippet if "if clause" b
if ${1:condition}
    ${2:clause}
endif
endsnippet

snippet ife "if else clause" b
if ${1:condition}
    ${2}
else
    ${3}
endif
endsnippet

snippet init  "definition of config init" b
function! config#`!p
names, _ = os.path.splitext(os.path.abspath(path))
subpath = re.split("autoload", names)[1]
text = os.path.split(subpath[1:])
snip.rv = '#'.join(text)
`#${1:init}() abort
    ${2}
endfunction
endsnippet
